<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>The SIP Command Line &mdash; SIP 4.16.6 Reference Guide</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '4.16.6',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/logo_tn.ico"/>
    <link rel="top" title="SIP 4.16.6 Reference Guide" href="index.html" />
    <link rel="next" title="SIP Specification Files" href="specification_files.html" />
    <link rel="prev" title="Using SIP" href="using.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="specification_files.html" title="SIP Specification Files"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="using.html" title="Using SIP"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">SIP 4.16.6 Reference Guide</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="the-sip-command-line">
<span id="ref-command-line"></span><h1>The SIP Command Line<a class="headerlink" href="#the-sip-command-line" title="Permalink to this headline">¶</a></h1>
<p>The syntax of the SIP command line is:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">sip</span> <span class="p">[</span><span class="n">options</span><span class="p">]</span> <span class="p">[</span><span class="n">specification</span><span class="p">]</span>
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">specification</span></tt> is the name of the specification file for the module.  If it
is omitted then <tt class="docutils literal"><span class="pre">stdin</span></tt> is used.</p>
<p>The full set of command line options is:</p>
<dl class="cmdoption">
<dt id="cmdoption-sip-h">
<tt class="descname">-h</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-h" title="Permalink to this definition">¶</a></dt>
<dd><p>Display a help message.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-V">
<tt class="descname">-V</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-V" title="Permalink to this definition">¶</a></dt>
<dd><p>Display the SIP version number.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-a">
<tt class="descname">-a</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-a" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the QScintilla API file to generate.  This file contains a
description of the module API in a form that the QScintilla editor
component can use for auto-completion and call tips.  (The file may also be
used by the SciTE editor but must be sorted first.)  By default the file is
not generated.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-b">
<tt class="descname">-b</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-b" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the build file to generate.  This file contains the information
about the module needed by the <a class="reference internal" href="build_system.html#ref-build-system"><em>SIP build system</em></a>
to generate a platform and compiler specific Makefile for the module.  By
default the file is not generated.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-B">
<tt class="descname">-B</tt><tt class="descclassname"> &lt;TAG&gt;</tt><a class="headerlink" href="#cmdoption-sip-B" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.16.</span></p>
</div>
<p>The tag is added to the list of <em>backstops</em>.  The option may be given more
than once if multiple timelines have been defined.  See the
<a class="reference internal" href="directives.html#directive-%Timeline"><tt class="xref std std-directive docutils literal"><span class="pre">%Timeline</span></tt></a> directive for more details.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-c">
<tt class="descname">-c</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-sip-c" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the directory (which must exist) into which all of the
generated C or C++ code is placed.  By default no code is generated.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-d">
<tt class="descname">-d</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-d" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.12: </span>Use the <a class="reference internal" href="#cmdoption-sip-X"><em class="xref std std-option">-X</em></a> option instead.</p>
</div>
<p>The name of the documentation file to generate.  Documentation is included
in specification files using the <a class="reference internal" href="directives.html#directive-%Doc"><tt class="xref std std-directive docutils literal"><span class="pre">%Doc</span></tt></a> and
<a class="reference internal" href="directives.html#directive-%ExportedDoc"><tt class="xref std std-directive docutils literal"><span class="pre">%ExportedDoc</span></tt></a> directives.  By default the file is not
generated.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-e">
<tt class="descname">-e</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-e" title="Permalink to this definition">¶</a></dt>
<dd><p>Support for C++ exceptions is enabled.  This causes all calls to C++ code
to be enclosed in <tt class="docutils literal"><span class="pre">try</span></tt>/<tt class="docutils literal"><span class="pre">catch</span></tt> blocks and C++ exceptions to be
converted to Python exceptions.  By default exception support is disabled.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-g">
<tt class="descname">-g</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-g" title="Permalink to this definition">¶</a></dt>
<dd><p>The Python GIL is released before making any calls to the C/C++ library
being wrapped and reacquired afterwards.  See <a class="reference internal" href="using.html#ref-gil"><em>The Python Global Interpreter Lock</em></a> and the
<a class="reference internal" href="annotations.html#function-annotation-ReleaseGIL"><tt class="xref std std-fanno docutils literal"><span class="pre">ReleaseGIL</span></tt></a> and <a class="reference internal" href="annotations.html#function-annotation-HoldGIL"><tt class="xref std std-fanno docutils literal"><span class="pre">HoldGIL</span></tt></a> annotations.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-I">
<tt class="descname">-I</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-sip-I" title="Permalink to this definition">¶</a></dt>
<dd><p>The directory is added to the list of directories searched when looking for
a specification file given in an <a class="reference internal" href="directives.html#directive-%Include"><tt class="xref std std-directive docutils literal"><span class="pre">%Include</span></tt></a> or
<a class="reference internal" href="directives.html#directive-%Import"><tt class="xref std std-directive docutils literal"><span class="pre">%Import</span></tt></a> directive.  Directory separators must always be <tt class="docutils literal"><span class="pre">/</span></tt>.
This option may be given any number of times.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-j">
<tt class="descname">-j</tt><tt class="descclassname"> &lt;NUMBER&gt;</tt><a class="headerlink" href="#cmdoption-sip-j" title="Permalink to this definition">¶</a></dt>
<dd><p>The generated code is split into the given number of files.  This makes it
easier to use the parallel build facility of most modern implementations of
<tt class="docutils literal"><span class="pre">make</span></tt>.  By default 1 file is generated for each C structure or C++
class.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-k">
<tt class="descname">-k</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-k" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.10.</span></p>
</div>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.12: </span>Use the <tt class="docutils literal"><span class="pre">keyword_arguments=&quot;All&quot;</span></tt> <a class="reference internal" href="directives.html#directive-%Module"><tt class="xref std std-directive docutils literal"><span class="pre">%Module</span></tt></a> directive
argument instead.</p>
</div>
<p>All functions and methods will, by default, support passing parameters
using the Python keyword argument syntax.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-o">
<tt class="descname">-o</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-o" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.10.</span></p>
</div>
<p>Docstrings will be automatically generated that describe the signature of
all functions, methods and constructors.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-p">
<tt class="descname">-p</tt><tt class="descclassname"> &lt;MODULE&gt;</tt><a class="headerlink" href="#cmdoption-sip-p" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the <a class="reference internal" href="directives.html#directive-%ConsolidatedModule"><tt class="xref std std-directive docutils literal"><span class="pre">%ConsolidatedModule</span></tt></a> which will contain the
wrapper code for this component module.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-P">
<tt class="descname">-P</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-P" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.10.</span></p>
</div>
<p>By default SIP generates code to provide access to protected C++ functions
from Python.  On some platforms (notably Linux, but not Windows) this code
can be avoided if the <tt class="docutils literal"><span class="pre">protected</span></tt> keyword is redefined as <tt class="docutils literal"><span class="pre">public</span></tt>
during compilation.  This can result in a significant reduction in the size
of a generated Python module.  This option disables the generation of the
extra code.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-r">
<tt class="descname">-r</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-r" title="Permalink to this definition">¶</a></dt>
<dd><p>Debugging statements that trace the execution of the bindings are
automatically generated.  By default the statements are not generated.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-s">
<tt class="descname">-s</tt><tt class="descclassname"> &lt;SUFFIX&gt;</tt><a class="headerlink" href="#cmdoption-sip-s" title="Permalink to this definition">¶</a></dt>
<dd><p>The suffix to use for generated C or C++ source files.  By default <tt class="docutils literal"><span class="pre">.c</span></tt>
is used for C and <tt class="docutils literal"><span class="pre">.cpp</span></tt> for C++.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-t">
<tt class="descname">-t</tt><tt class="descclassname"> &lt;TAG&gt;</tt><a class="headerlink" href="#cmdoption-sip-t" title="Permalink to this definition">¶</a></dt>
<dd><p>The SIP version tag (declared using a <a class="reference internal" href="directives.html#directive-%Timeline"><tt class="xref std std-directive docutils literal"><span class="pre">%Timeline</span></tt></a> directive) or
the SIP platform tag (declared using the <a class="reference internal" href="directives.html#directive-%Platforms"><tt class="xref std std-directive docutils literal"><span class="pre">%Platforms</span></tt></a> directive)
to generate code for.  This option may be given any number of times so long
as the tags do not conflict.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-T">
<tt class="descname">-T</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-T" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.16.6: </span>This option is now ignored and timestamps are always disabled.</p>
</div>
<p>By default the generated C and C++ source and header files include a
timestamp specifying when they were generated.  This option disables the
timestamp so that the contents of the generated files remain constant for a
particular version of SIP.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-w">
<tt class="descname">-w</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-w" title="Permalink to this definition">¶</a></dt>
<dd><p>The display of warning messages is enabled.  By default warning messages
are disabled.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-x">
<tt class="descname">-x</tt><tt class="descclassname"> &lt;FEATURE&gt;</tt><a class="headerlink" href="#cmdoption-sip-x" title="Permalink to this definition">¶</a></dt>
<dd><p>The feature (declared using the <a class="reference internal" href="directives.html#directive-%Feature"><tt class="xref std std-directive docutils literal"><span class="pre">%Feature</span></tt></a> directive) is
disabled.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-X">
<tt class="descname">-X</tt><tt class="descclassname"> &lt;ID:FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-X" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.12.</span></p>
</div>
<p>The extract (defined with the <a class="reference internal" href="directives.html#directive-%Extract"><tt class="xref std std-directive docutils literal"><span class="pre">%Extract</span></tt></a> directive) with the
identifier <tt class="docutils literal"><span class="pre">ID</span></tt> is written to the file <tt class="docutils literal"><span class="pre">FILE</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-sip-z">
<tt class="descname">-z</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-z" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.16.6: </span>Use the <tt class="docutils literal"><span class="pre">&#64;&lt;FILE&gt;</span></tt> style instead.</p>
</div>
<p>The name of a file containing more command line options.</p>
</dd></dl>

<p>Command line options can also be placed in a file and passed on the command
line using the <tt class="docutils literal"><span class="pre">&#64;</span></tt> prefix.</p>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/logo.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="using.html"
                        title="previous chapter">Using SIP</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="specification_files.html"
                        title="next chapter">SIP Specification Files</a></p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="specification_files.html" title="SIP Specification Files"
             >next</a> |</li>
        <li class="right" >
          <a href="using.html" title="Using SIP"
             >previous</a> |</li>
        <li><a href="index.html">SIP 4.16.6 Reference Guide</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2015 Riverbank Computing Limited.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>